package me.jessyan.mvparms.demo.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.Map;

/**
 * Created by 52248 on 2018/8/21.
 */

public class ParamJson implements Parcelable {
    private String token;
    private String method;
    private Map<String,Object> data;

    public ParamJson() {
    }

    public ParamJson(String token, String method, Map<String, Object> data) {
        this.token = token;
        this.method = method;
        this.data = data;
    }


    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    protected ParamJson(Parcel in) {
    }

    public static final Creator<ParamJson> CREATOR = new Creator<ParamJson>() {
        @Override
        public ParamJson createFromParcel(Parcel in) {
            return new ParamJson(in);
        }

        @Override
        public ParamJson[] newArray(int size) {
            return new ParamJson[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(token);
        dest.writeString(method);
        dest.writeMap(data);
    }
}
